<?php	$p=permissionController::singleton(); ?>

<div id="page">
<div id="content">

<form action=<?php echo BASE_PATH;?>Utente/View_search/ method='get'>
<label>Cerca Username:</label>
<input type="submit" value="Cerca">
<input type="text" name="data" id="data" size="9"/>
</form>

 <br>
	<table>

			<th>Username</th>
			<th>Password</th>
			<th>Nome</th>
			<?php 
			$uri['controller']="Utente";
			$uri['method']="Delete_Utente";
			if($p->permission($uri)){ ?>
			<th>Cancella</th>
			<?php }?>
			
		

		<?php

		foreach ($vars as $result){
			echo "<tr>
					<td >"
					.$result[Username]."
					</td>
					<td >"
					.$result[Password]."
					</td>
					<td >"
					.$result[Nome]."
					</td>
					<!--<td>
						<a  href='".BASE_PATH."Utente/openViewUpadateUtente/?id=".$result[Username]."'>
							<img src='".BASE_PATH."application/view/image/modifica.jpg' border='0'>
						</a>
					</td>--!>";
					 
			    $uri['controller']="Utente";
			    $uri['method']="Delete_Utente";
			    if($p->permission($uri)){ 
				echo"<td>
						<a  href='Utente/Delete_Utente/?id=".$result[Username]."'>
							<img src='".BASE_PATH."application/view/image/esci.png' border='0'>
						</a>
				</tr>";
				}
		}

	?>
</table>

</div>
</div>